package com.dm.client;

import com.dm.config.DmConfiguration;
import com.dm.fallback.DmBaseImageClientFallBack;
import com.dm.pojo.DmBaseImage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
* Feign
*/
@FeignClient(name = "dm-base-provider", configuration = DmConfiguration.class, fallback = DmBaseImageClientFallBack.class)
public interface DmBaseImageClient {
@RequestMapping(value = "/getDmBaseImageById",method = RequestMethod.POST)
public DmBaseImage getDmBaseImageById(@RequestParam("id") Long id)throws Exception;

@RequestMapping(value = "/getDmBaseImageListByMap",method = RequestMethod.POST)
public List<DmBaseImage>	getDmBaseImageListByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/getDmBaseImageCountByMap",method = RequestMethod.POST)
public Integer getDmBaseImageCountByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/qdtxAddDmBaseImage",method = RequestMethod.POST)
public Integer qdtxAddDmBaseImage(@RequestBody DmBaseImage dmBaseImage)throws Exception;

@RequestMapping(value = "/qdtxModifyDmBaseImage",method = RequestMethod.POST)
public Integer qdtxModifyDmBaseImage(@RequestBody DmBaseImage dmBaseImage)throws Exception;

@RequestMapping(value = "/queryDmImageList", method = RequestMethod.POST)
public List<DmBaseImage> queryDmImageList(@RequestParam("targetId") Long targetId,
                                          @RequestParam("type") Integer type,
                                          @RequestParam("category") Integer category) throws Exception ;
}

